Learn R Programming

seem (version 1.0)

Primary productivity functions: Functions to determine primary productivity

Description

Functions to calculate PP rates in aquatic ecosystems. DO.PP.pond is a model functions are used as part of argument model to call simulation functions.

Usage

PP.Smith(L, Pmax, alpha)
PP.Thornley(L, Pmax, alpha, ksi)
PP.Steele(L, Pmax, Lopt)
PP.Eilers(L, Pmax, alpha, Lopt)
PPT.Smith(Ls,k,z,Pmax,alpha)
PPT.Steele(Ls,k,z,Pmax,Lopt)
PPrates.depth(z, param,sw.plot=T)
DO.PP.pond(t,p,x)

Arguments

L
sunlight intensity
Pmax
maximum rate
alpha
slope at L=0
ksi
shape parameter
Lopt
sunlight at which PP is maximum
Ls
sunlight at the surface (actually just below surface)
k
sunlight attenuation coefficient
z
depth
param
parameter array c(k,Ls, Pmax,alpha,Lopt)
sw.plot
logical variable to decide whether to plot
t
time
p
parameters, an array
x
state variable

Value

  • PP and PPT functions return primary productivity rate. PPrates.depth returns a data.frame with z,L,PP,PPT Model functions: Rate of change or derivative of model.

Details

The four functions PP.Smith, PP.Thornley, PP.Steele, and PP.Eilers calculate the response to sunlight by the Smith, Thornley, Steele, and Eilers-Peeters models.

PPT.Smith and PPT.Steele functions implement depth-averaged Smith and Steele models. In addition to the model parameters, they use sunlight at the subsurface, attenuation coefficient, and depth as arguments.

PPrates.depth calculates productivity as a function of depth using PPT.Smith and PPT.Steele.

References

Acevedo M.F. 2012. Simulation of Ecological and Environmental Models. CRC Press.

See Also

Simulation functions sim, simd

Examples

Run this code
L <- seq(0,300,10);nL <- length(L)

# Smith model
Pmax=1; alpha <- c(0.01,0.02,0.03)
np <- length(alpha)
PP <- matrix(nrow=nL,ncol=np)
for(i in 1:np)
PP[,i] <- PP.Smith(L,Pmax,alpha[i])

# Thornley NRH model
L <- seq(0,300,1);nL <- length(L)
Pmax=1; alpha <-c(0.01,0.02,0.03); ksi <- 0.1
np <- length(alpha)
PP <- matrix(nrow=nL,ncol=np)
for(i in 1:np)
 PP[,i] <- PP.Thornley(L,Pmax,alpha[i],ksi)

# Steele model
Pmax=1; Lopt <- c(150,200,250)
np <- length(Lopt)
PP <- matrix(nrow=nL,ncol=np)
for(i in 1:np)
PP[,i] <- PP.Steele(L,Pmax,Lopt[i])

#  Eiler-Peeters
Pmax=1; Lopt <- c(150,200,250); alpha=0.02
np <- length(Lopt)
PP <- matrix(nrow=nL,ncol=np)
for(i in 1:np)
PP[,i] <- PP.Eilers(L,Pmax,alpha,Lopt[i])

z <- seq(0,3,0.1)
k = 0.5; Ls=300
Pmax =1; alpha =0.02
Pmax =1; Lopt = 200
PPrates.depth(z, param=c(k,Ls,Pmax,alpha,Lopt))

# cool water
pond <- list(f=DO.PP.pond);param <- list(plab="Rsp",pval=c(0.18,0.2,0.22))
t.X <- sim(pond,"chp14/DO-PP-inp.csv", param)

Run the code above in your browser using DataLab